﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Geometry
{
   public class Fly
   {
    //flyevent event;         /* application's callback for fly events        */
    //public void *data;             /* application-supplied data attachment         */
    public int eventnum;           /* event type code (see defs)                   */
    public int key;                /* ascii value of key pressed for KEY events    */
    public int digits;             /* number entered via keyboard (can modify ops) */
    public int wxsize,wysize;      /* current window size                          */
    public int freeze;             /* 0=mesh updates requested, 1=no mesh updates  */
    public double velocity;        /* flight rate in look direction                */
    public double t0;              /* time in usec of last position udate          */
    public double[] uvwxyz = new double[12];      /* view rotation state (0-8 rotation, 9-11 eye) */
    public float[,] frust_planes = new float[6,4]; /* six frustum plane equation coefficients    */
    public uint gridtex_id;      /* texture id to Bind for showing grid          */
    public float[,] gridtex_t = new float[3,3];  /*   texture coordinates for three verts        */

    /* the remaining fields are primarily for internal use of the library */
    public int window;             /* glut window id                               */
    public int mx0,my0;            /* previous mouse position                      */
    public int dragrot;            /* 0= not rotating, 1=rotating                  */
    public double xc,yc,scale;     /* window center, size (for rotation purposes)  */
    public char[] gridtex_raster = new char[128*128*4]; /* texture for showing mesh             */
    public double[,] viewtab = new double[640, 12];/* viewpoints 0-9 interpolated for flight loop  */
    public double animate_t0;      /* start time of animation loop                 */
    public double animate_t;       /* flight loop time 0<=t<10 (t<0 not animating) */
    public double animate_tloop;   /* time per loop in usec                        */
    public int loop_framecnt;      /* frames drawn per flight loop (benchmark stat)*/
    public int loop0;              /* loop number last frame                       */
    public int show_loop;          /* 1=show flight loop, 0=hide flight loop       */
   }
}
